/**
Group: efl/datepicker (@since 1.23)
	 Part Swallow: efl.field0 (required)
	 Part Swallow: efl.field1 (required)
	 Part Swallow: efl.field2 (required)
Group: efl/datepicker/spin_button (@since 1.23)
	 Part Swallow: efl.dec_button (required)
	 Part Swallow: efl.entry (required)
	 Part Swallow: efl.inc_button (required)
	 Part Swallow: efl.text_button (required)
	 Signal: efl,button,visible,off
	 Signal: efl,button,visible,on
	 Signal: efl,entry,visible,off
	 Signal: efl,entry,visible,on
	 Signal: efl,state,access,active
	 Signal: efl,state,access,inactive
	 Signal: efl,state,disabled
	 Signal: efl,state,enabled
*/
group { "efl/datepicker";
   data.item: "version" "123";
   parts {
      spacer { "base";
         scale;
         desc { "default";
             min: 160 40;
         }
      }
      spacer { "padding_bg_top";
         scale;
         desc { "default";
            min: 0 5;
            max: -1 5;
            fixed: 0 1;
            rel.to: "base";
            rel1.relative: 0.0 0.0;
            rel2.relative: 1.0 0.0;
            align: 0.5 0.0;
         }
      }
      spacer { "padding_bg_bottom";
         scale;
         desc { "default";
            min: 0 5;
            max: -1 5;
            fixed: 0 1;
            rel.to: "base";
            rel1.relative: 0.0 1.0;
            rel2.relative: 1.0 1.0;
            align: 0.5 1.0;
         }
      }
      spacer { "bg";
         scale;
         desc { "default";
            min: 160 40;
            max: 160 40;
            rel1 {
               relative: 0.0 1.0;
               to: "padding_bg_top";
            }
            rel2 {
               relative: 1.0 0.0;
               to: "padding_bg_bottom";
            }
         }
      }
      spacer { "padding_left";
         scale;
         desc { "default";
            min: 5 0;
            max: 5 -1;
            fixed: 1 0;
            rel.to: "bg";
            rel1.relative: 0.0 0.0;
            rel2.relative: 0.0 1.0;
            align: 0.0 0.0;
         }
      }
      spacer { "padding_right";
         scale;
         desc { "default";
            min: 5 0;
            max: 5 -1;
            fixed: 1 0;
            rel.to: "bg";
            rel1.relative: 1.0 0.0;
            rel2.relative: 1.0 1.0;
            align: 1.0 1.0;
         }
      }
      swallow { "efl.field0"; required;
         mouse;
         scale;
         desc { "default";
            fixed: 1 1;
            min: 40 0;
            rel.to: "padding_left";
            rel1.relative: 1.0 0.0;
            align: 0.0 0.5;
         }
      }
      spacer { "padding_center1";
         scale;
         desc { "default";
            fixed: 1 0;
            min: 5 0;
            max: 5 -1;
            rel.to: "efl.field0";
            rel1.relative: 1.0 0.0;
            align: 0.0 0.5;
         }
      }
      swallow { "efl.field1"; required;
         mouse;
         scale;
         desc { "default";
            fixed: 1 1;
            min: 40 0;
            rel1 {
               relative: 1.0 0.0;
               to: "padding_center1";
            }
            rel2 {
               relative: 0.0 1.0;
               to_x: "padding_center2";
               to_y: "padding_center1";
            }
         }
      }
      spacer { "padding_center2";
         scale;
         desc { "default";
            fixed: 1 0;
            min: 10 0;
            max: 10 -1;
            rel.to: "efl.field2";
            rel2.relative: 0.0 1.0;
            align: 1.0 0.5;
         }
      }
      swallow { "efl.field2"; required;
         mouse;
         scale;
         desc { "default";
            fixed: 1 1;
            min: 40 0;
            rel.to: "padding_right";
            rel2.relative: 0.0 1.0;
            align: 1.0 0.5;
         }
      }
      rect { "access";
         repeat;
         desc { "default";
            fixed: 1 1;
            rel.to: "bg";
            color: 0 0 0 0; // no cc
         }
      }
   }
}

group { "efl/datepicker/spin_button";
   data.item: "version" "123";
   parts {
      rect { "clip";
         desc { "default";
            rel.to: "efl.text_button";
         }
      }
      spacer { "base";
         scale;
         desc { "default";
           min: 20 60;
         }
      }
      rect { "access";
         repeat;
         desc { "default";
            fixed: 1 1;
            color: 0 0 0 0; // no cc
            rel.to: "base";
            hid;
         }
         desc { "active";
            inherit: "default";
            vis;
         }
      }
      swallow { "efl.inc_button"; required;
         scale;
         desc { "default";
            align: 0.5 0.0;
            min: 20 20;
            max: 20 20;
            fixed: 1 1;
         }
      }
      swallow { "efl.dec_button"; required;
         scale;
         desc { "default";
            align: 0.5 1.0;
            min: 20 20;
            max: 20 20;
            fixed: 1 1;
         }
      }
      swallow { "efl.entry"; required;
         clip: "clip";
         desc { "default";
            fixed: 1 1;
            rel.to: "efl.text_button";
            hid;
         }
         desc { "active";
            inherit: "default";
            vis;
         }
      }
      swallow { "efl.text_button"; required;
         scale;
         desc { "default";
            rel.to_x: "base";
            rel1 {
               to_y: "efl.inc_button";
               relative: 0.0 1.0;
            }
            rel2 {
               to_y: "efl.dec_button";
               relative: 1.0 0.0;
            }
            min: 0 20;
            max: -1 20;
            fixed: 0 1;
         }
         desc { "inactive";
            inherit: "default";
            hid;
         }
      }
      rect { "disabler";
         norepeat;
         nomouse;
         desc { "default";
            color: 0 0 0 0; // no cc
            hid;
         }
         desc { "disabled";
            inherit: "default";
            vis;
         }
      }
   }
   programs {
      program { signal: "efl,entry,visible,on"; source: "efl";
         action: STATE_SET "active";
         target: "efl.entry";
      }
      program { signal: "efl,entry,visible,off"; source: "efl";
         action: STATE_SET "default";
         target: "efl.entry";
      }
      program { signal: "efl,button,visible,on"; source: "efl";
         action: STATE_SET "default";
         target: "efl.text_button";
      }
      program { signal: "efl,button,visible,off"; source: "efl";
         action: STATE_SET "inactive";
         target: "efl.text_button";
      }
      program { signal: "efl,state,access,active"; source: "efl";
         action:  STATE_SET "active";
         target: "access";
      }
      program { signal: "efl,state,access,inactive"; source: "efl";
         action:  STATE_SET "default";
         target: "access";
      }
      program { signal: "efl,state,disabled"; source: "efl";
         action: STATE_SET "disabled";
         target: "disabler";
      }
      program { signal: "efl,state,enabled"; source: "efl";
         action: STATE_SET "default";
         target: "disabler";
      }
   }
}
